/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-02-19     xieya       the first version
 */
#ifndef BOARD_BSP_EEPROM_H_
#define BOARD_BSP_EEPROM_H_

#include "hc32_ll.h"

#define DEVICE_ADDR                     (0x50U)

void BSP_I2c_Init(void);
void eeprom_master_parameter_save(void);
void eeprom_master_parameter_read(void);
void eeprom_master_test(void);

static int32_t I2C_Master_ReSetLocation(uint16_t u16DevAddr, uint8_t const au8Data[], uint32_t u32Size, uint32_t u32Timeout);

int32_t I2C_Master_Transmit(uint16_t u16DevAddr,uint16_t u16MemAddr, uint8_t const au8Data[], uint32_t u32Size, uint32_t u32Timeout);

int32_t I2C_Master_Receive(uint16_t u16DevAddr,uint16_t u16MemAddr, uint8_t au8Data[], uint32_t u32Size, uint32_t u32Timeout);

#endif /* BOARD_BSP_EEPROM_H_ */
